package net.lanelife.casino.caipiao.validation;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;

public class RebatePointValidator implements ConstraintValidator<RebatePoint, Double> {
	
	@Override
	public void initialize(RebatePoint constraintAnnotation) {
		
	}

	@Override
	public boolean isValid(Double value, ConstraintValidatorContext context) {
		return value.toString().matches("^(\\d+)(\\.\\d{1})?$");
	}

}
